#include "pthread_impl.h"

int pthread_mutexattr_setrobust(pthread_mutexattr_t *a, int robust)
{
    if ((a == NULL) || (robust > (unsigned int)PTHREAD_MUTEX_ROBUST)) {
        return EINVAL;
    }

    if (robust) {
        a->__attr |= 4;
        return 0;
    }
    a->__attr &= ~4;
    return 0;
}
